//前置防抖
function ttle  (fn,time=2000){
    let _item
    return function (){
        if(_item)return
        fn()
        _item = setTimeout(() => {
            _item = false
        }, time);
    }
}
export default ttle
